//
//  SWHomeController.swift
//  STslender
//
//  Created by mac on 15/12/5.
//  Copyright © 2015年 itcast. All rights reserved.
//

import UIKit

class SWHomeController: SWVisitorViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
         let bool = unlogin
        print("真假\(!bool)")
        
        //如果 没登陆加载
        if unlogin {
            visitorView?.setshowVisitorMessage(nil, message: nil)
            return
        }
        
         setupUI()
  
    }

    /**
    设置界面
    */
    private func setupUI(){
        
    //只要覆盖了 navigationItem.backBarButtonItem 这个方法就会失去 拖拽手势功能。
       
        navigationItem.leftBarButtonItem = UIBarButtonItem(imgName: "navigationbar_friendsearch", target: self, action: "friendsearch")
        navigationItem.rightBarButtonItem = UIBarButtonItem(imgName: "navigationbar_pop", target: self, action: "friendsearch")
    }
    
    
    @objc private func friendsearch(){
        let vc = SWTempViewController()
        navigationController?.pushViewController(vc, animated: true)
    }

}
